package org.simplecrm.domain.usergroup;

import java.io.Serializable;

/**
 * UserGroup entity.
 */
public class UserGroup implements Serializable {

    private Integer id;
    private String groupName;

    public UserGroup() {
    }

    public UserGroup(Integer id, String groupName) {
        setId(id);
        setGroupName(groupName);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof UserGroup)) {
            return false;
        }

        UserGroup userGroup = (UserGroup) o;

        if (!id.equals(userGroup.id)) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public String toString() {
        return "UserGroup{" +
                "id=" + id +
                ", groupName='" + groupName + '\'' +
                '}';
    }
}
